<%@ Control Language="C#" ClassName="TradeReferences" Inherits="Dimok.Web.UI.TableControl" %>
<script RunAt="server">
	public int LoanID { set { ds.LoanID = value; } }
</script>
<table>
<tr><td>
<ajaxtk:CollapsiblePanelExtender runat="server" ID="cpeCBT"
	TargetControlID="pnlCBT"
	CollapseControlID="pnlCBTHeader" ExpandControlID="pnlCBTHeader"
	TextLabelID="lblCBTLabel"
	ImageControlID="imgCBTPanel"
	CollapsedImage="~/images/Buttons/expand.jpg" ExpandedImage="~/images/Buttons/collapse.jpg"
	Collapsed="true"	CollapsedText="" ExpandedText=""
	SuppressPostBack="true"
></ajaxtk:CollapsiblePanelExtender>
<asp:Panel ID="pnlCBTHeader" CssClass="PanelHeaderBlue" style="width:100%" runat="server">
<table cellPadding="0" cellSpacing="0"><tr>
<th Width="1px"><asp:Image ID="imgCBTPanel" ImageUrl="~/images/Buttons/expand.jpg" runat="server" />
<td nowrap><label ID="lblCBTLabel" runat="server">Trade References</label></td>
</tr></table>
</asp:Panel> 
<asp:Panel ID="pnlCBT" runat="server" CssClass="PannelContent">
<style>
TABLE .TradeRefs TD{text-align:right}
</style>
<asp:UpdatePanel ID="upCBT" UpdateMode="Always" runat="server">
	<ContentTemplate>
<UI:GridViewEx  runat="server" AutoGenerateColumns="False" 
				DataSourceID="ds" AllowSorting="true"
				EmptyDataText="There are no data records to display."
				DataKeyNames="ID"
>
				<Columns>
					<asp:TemplateField HeaderText="Opened" SortExpression="AccountState">
						<ItemTemplate><%#(bool)Eval("AccountState")? "1":""%></ItemTemplate>
					</asp:TemplateField>
					<asp:TemplateField HeaderText="Auto" SortExpression="IsAuto">
						<ItemTemplate><%#(bool)Eval("IsAuto")? "1":""%></ItemTemplate>
					</asp:TemplateField>
					<asp:TemplateField HeaderText="TrIn" SortExpression="IsTradeIn">
						<ItemTemplate><%#(bool)Eval("IsTradeIn") ? "1" : ""%></ItemTemplate>
					</asp:TemplateField>
					<asp:TemplateField HeaderText="Repo" SortExpression="IsRepo">
						<ItemTemplate><%#(bool)Eval("IsRepo") ? "1" : ""%></ItemTemplate>
					</asp:TemplateField>
					<asp:TemplateField HeaderText="<span title='Is PreForeclosure'>IsPFC</span>" SortExpression="IsPreForeclosure">
						<ItemTemplate><%#(bool)Eval("IsPreForeclosure") ? "1" : ""%></ItemTemplate>
					</asp:TemplateField>
					<asp:TemplateField HeaderText="<span title='Is Foreclosure'>IsFC</span>" SortExpression="IsForeclosure">
						<ItemTemplate><%#(bool)Eval("IsForeclosure") ? "1" : ""%></ItemTemplate>
					</asp:TemplateField>
					<asp:TemplateField HeaderText="<span title='Past Due Ratio'>PDR</span>" SortExpression="PastDueRatio">
						<ItemTemplate><%#Eval("PastDueRatio")%></ItemTemplate>
					</asp:TemplateField>
					<asp:BoundField DataField="HighCredit" HeaderText="HighCredit" 
						SortExpression="HighCredit" DataFormatString="{0:n0}" HtmlEncode="false" ItemStyle-HorizontalAlign="Right" />
					<asp:BoundField DataField="HighCreditEx" HeaderText="HighCreditEx" 
						SortExpression="HighCreditEx" DataFormatString="{0:n0}" HtmlEncode="false" ItemStyle-HorizontalAlign="Right" />
					<asp:BoundField DataField="Ballance" HeaderText="Balance" 
						SortExpression="Ballance" DataFormatString="{0:n0}" HtmlEncode="false" ItemStyle-HorizontalAlign="Right" />
					<asp:BoundField DataField="Term" HeaderText="Term" SortExpression="Term" ItemStyle-HorizontalAlign="Right" />
					<asp:BoundField DataField="TermMos" HeaderText="TermMos" DataFormatString="{0:n0}" HtmlEncode="false" InsertVisible="true" 
						SortExpression="TermMos" ItemStyle-HorizontalAlign="Right" />
					<asp:BoundField DataField="MosToZero" HeaderText="MosLeft" DataFormatString="{0:n0}" HtmlEncode="false"
						SortExpression="MosToZero" ItemStyle-HorizontalAlign="Right" />
					<asp:BoundField DataField="PastDue" HeaderText="PastDue" 
						SortExpression="PastDue" ItemStyle-HorizontalAlign="Right" />
					<asp:BoundField DataField="AccType" HeaderText="AccType" 
						SortExpression="AccType" />
					<asp:BoundField DataField="Status" HeaderText="Status" 
						SortExpression="Status" />
					<asp:BoundField DataField="MR" HeaderText="MR" SortExpression="MR" ItemStyle-HorizontalAlign="Right" />
					<asp:BoundField DataField="ECOA" HeaderText="ECOA" SortExpression="ECOA" />
					<asp:BoundField DataField="FirmCode" HeaderText="FirmCode" 
						SortExpression="FirmCode" />
					<asp:BoundField DataField="IndustryCode" HeaderText="IndustryCode" 
						SortExpression="IndustryCode" />
					<asp:BoundField DataField="ReportDate" HeaderText="ReportDate" 
						SortExpression="ReportDate" DataFormatString="{0:MM-dd-yyyy}" HtmlEncode="false" />
					<asp:BoundField DataField="OpenDate" HeaderText="OpenDate" DataFormatString="{0:MM-dd-yyyy}" HtmlEncode="false"
						SortExpression="OpenDate" />
					<asp:BoundField DataField="LastDate" HeaderText="LastDate" DataFormatString="{0:MM-dd-yyyy}" HtmlEncode="false"
						SortExpression="LastDate" />
					<asp:BoundField DataField="AccNumber" HeaderText="AccNumber" 
						SortExpression="AccNumber" />
					<asp:BoundField DataField="AccountDesc" HeaderText="AccountDesc" 
						SortExpression="AccountDesc" />
					<asp:BoundField DataField="DatePulled" HeaderText="DatePulled" 
						SortExpression="DatePulled" />
					<asp:BoundField DataField="_30_" HeaderText="_30_" 
						SortExpression="_30_" />
					<asp:BoundField DataField="_60_" HeaderText="_60_" 
						SortExpression="_60_" />
					<asp:BoundField DataField="_90_" HeaderText="_90_" 
						SortExpression="_90_" />
					<asp:BoundField DataField="DD1" HeaderText="DD1" SortExpression="DD1" />
					<asp:BoundField DataField="DD2" HeaderText="DD2" SortExpression="DD2" />
					<asp:BoundField DataField="DD3" HeaderText="DD3" SortExpression="DD3" />
					<asp:BoundField DataField="DS1" HeaderText="DS1" SortExpression="DS1" />
					<asp:BoundField DataField="DS2" HeaderText="DS2" SortExpression="DS2" />
					<asp:BoundField DataField="DS3" HeaderText="DS3" SortExpression="DS3" />
				</Columns>
</UI:GridViewEx>
	</ContentTemplate>
</asp:UpdatePanel>
</asp:Panel>
</table>
<DS:TradeReferencesDataSource ID="ds" EmtyRowPolicy="None" runat="server"></DS:TradeReferencesDataSource>
